const mongoose = require("mongoose");

// 定义骨架
// { versionKey: false } 能够消除mongoose操作mongodb数据库时多添加上 __v字段
const usersSchema = mongoose.Schema(
  {
    phone: String,
    point: Number,
    deposit: Number,
    level: String,
    signin: Number,
    haveSign: Number,
    gather: Array,
    place: String,
  },
  { versionKey: false }
);

// 创建模型
const usersModel = mongoose.model("users", usersSchema);

module.exports = usersModel;
